package com.zhao.service.bussness;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.zhao.data.mapper.RoleMapper;

@Service
public class PermissionService extends BussnessService {

	@Autowired
	RoleMapper roleMapper;

	@Override
	public void test1() {
		//		Role role = roleMapper.selectByPrimaryKey(Long.valueOf(1));
		//		role.setRoleName("管理员1");
		//		roleMapper.updateByPrimaryKey(role);
		//		role.setRoleCode("ADMIN1");
		//		roleMapper.updateByPrimaryKey(role);
	}

	@Transactional(readOnly = true, propagation = Propagation.NOT_SUPPORTED)
	@Override
	public void test2() {
		//		Role role = roleMapper.selectByPrimaryKey(Long.valueOf(1));
		//		role.setRoleName("管理员2");
		//		roleMapper.updateByPrimaryKey(role);
		//		role.setRoleCode("ADMIN2");
		//		roleMapper.updateByPrimaryKey(role);
	}

}
